import Vue from 'vue'
import Router from 'vue-router'
import index from '@/components/index'
import detail from '@/components/detail'
import vegetables from '@/components/vegetables'
import fruit from '@/components/fruit'
import drink from '@/components/drink'
import surround from '@/components/surround'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      component:index
    },
    {
      path: '/index/:id',
      name: 'index',
      component: index
    },
    {
      path: '/detail/:id',
      name: 'detail',
      component: detail
    },
    {
      path: '/vegetables/:id',
      name: 'vegetables',
      component: vegetables
    },
    {
      path: '/fruit/:id',
      name: 'fruit',
      component: fruit
    },
    {
      path: '/drink/:id',
      name: 'drink',
      component: drink
    },
    {
      path: '/surround/:id',
      name: 'surround',
      component: surround
    },
  ]
})
